<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateElectiveClassGroupsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('elective_class_groups', function (Blueprint $table) {
            $table->increments('id');
            $table->string('class_group_name');
            $table->integer('class_group_number')->nullable();
            $table->timestamps();
        });
        Schema::table('course_times', function (Blueprint $table) {
            $table->string('class_group_id')->nullable();
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('elective_class_groups');
        Schema::table('course_times', function (Blueprint $table) {
            $table->dropColumn('class_group_id');
        });
        // Schema::dropIfExists('course_class_groups');
    }
}
